package Form::Field::CountrySelectBox;

use strict;
use warnings;
use base qw(Rose::HTML::Form::Field::SelectBox);
use Country::Manager;

sub new {
	my $class = shift;
	my $self  = $class->SUPER::new(@_);

	my $countries = Country::Manager->get_countries( 'sort_by' => 'name' );
	
	foreach my $country ( @{$countries} ) {
		$self->add_options( $country->id => $country->name );
	}
	
	$self->multiple(1);
	bless( $self, $class );
	return $self;
} ## end sub new

1;
